package com.haitonghop.modules.girl;

import com.haitonghop.R;
import com.haitonghop.controls.AdsViewControl;
import com.haitonghop.main.AdsBussiness;
import com.haitonghop.main.DisplayUtils;
import com.haitonghop.modules.tamdiem.TamDiemDetailModulesActivity;
import com.haitonghop.utils.Logger;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Display;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.TextView;

public class GirlActivity extends Activity implements OnClickListener {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);

		// Remove notification bar
		this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.girl_activity_layout);

		TextView textView = (TextView) findViewById(R.id.titleActivity);
		textView.setText("Girl xinh vô đối");

		prView = (AdsViewControl) findViewById(R.id.prview);

		Button moreFunction = (Button) findViewById(R.id.btnMoreFunctions);
		if (moreFunction != null) {
			moreFunction.setVisibility(View.GONE);
		}
		Button back = (Button) findViewById(R.id.btnBackAcvitity);
		if (back != null) {
			back.setOnClickListener(new OnClickListener() {

				public void onClick(View v) {
					finish();
				}
			});
		}

//		ImageButton top20 = (ImageButton) findViewById(R.id.btnTop20);
//		top20.setOnClickListener(this);
		ImageButton btnChannelTeen = (ImageButton) findViewById(R.id.btnChannelTeen);
		btnChannelTeen.setOnClickListener(this);
//		ImageButton btnChannelSexy = (ImageButton) findViewById(R.id.btnChannelSexy);
//		btnChannelSexy.setOnClickListener(this);
		ImageButton btnRandom = (ImageButton) findViewById(R.id.btnRandom);
		btnRandom.setOnClickListener(this);

		ImageButton btnVietNam = (ImageButton) findViewById(R.id.btnVietNam);
		btnVietNam.setOnClickListener(this);
//		ImageButton btnAsia = (ImageButton) findViewById(R.id.btnAsia);
//		btnAsia.setOnClickListener(this);
//		ImageButton btnUS = (ImageButton) findViewById(R.id.btnUS);
//		btnUS.setOnClickListener(this);
		ImageButton btnNew = (ImageButton) findViewById(R.id.btnNew);
		btnNew.setOnClickListener(this);
	}
	AdsViewControl prView = null;
	void doAdsByServer() {
		AdsBussiness.getInstance().doGetAdsFromServer(this, prView);
	}
	
	@Override
	protected void onStart() {
		// TODO Auto-generated method stub
		super.onStart();
		doAdsByServer();
	}

	public void onClick(View v) {
		if (v != null) {
			int actionId = v.getId();		

			int id = actionId;
//			if(id !=  R.id.btnTop20){
				Intent intent = new Intent(getApplication(), GirlViewModules.class);
				intent.putExtra("ID", id);
				startActivity(intent);
//			}
			
		}

	}
}
